import request from '@/utils/request'

// 查询生产工单列表
export function listWorkOrder(query) {
  return request({
    url: '/yyj/pro/workOrder/list',
    method: 'get',
    params: query
  })
}

// 查询生产工单详细
export function getWorkOrder(workOrderCode) {
  return request({
    url: '/yyj/pro/workOrder/' + workOrderCode,
    method: 'get'
  })
}

// 新增生产工单
export function addWorkOrder(data) {
  return request({
    url: '/yyj/pro/workOrder',
    method: 'post',
    data: data
  })
}

// 修改生产工单
export function updateWorkOrder(data) {
  return request({
    url: '/yyj/pro/workOrder',
    method: 'put',
    data: data
  })
}

// 删除生产工单
export function delWorkOrder(workOrderCode) {
  return request({
    url: '/yyj/pro/workOrder/' + workOrderCode,
    method: 'delete'
  })
}
